<?php
// +----------------------------------------------------------------------
// |集体备课模块
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.onethink.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: 水月居 <singliang@qq.com> <http://www.zjttwgy.com>
// +----------------------------------------------------------------------

namespace Jtbk\Model;
use Think\Model;
//use Think\Page;

/**
 * 集体备课基础模型
 */
class JxSubjectModel extends Model{
    protected $_validate = array(
        array('subject', '1,10', '学科名称不合法', self::EXISTS_VALIDATE, 'length'),
        array('savepath', '1,20', '路径长度不合法', self::EXISTS_VALIDATE, 'length'),
    );

    protected $_auto = array(
        array('update_time', NOW_TIME, self::MODEL_BOTH),
        array('create_time', NOW_TIME, self::MODEL_INSERT),
        array('status', '1', self::MODEL_INSERT),
        // array('uid', 'is_login',3, 'function'),
    );
        /**
     * 获取上传根目录
     * @return integer 数据id
     * @author singliang <singliang@163.com>
     */
    public function getSubjectInfo($sid=1){
        $result = $this->find($sid);
        return $result;
    }
}
